from django.db import models


# Create your models here.

class Navigation(models.Model):
    name = models.CharField(max_length=50, verbose_name='导航名称', blank=False, null=False)
    url = models.CharField(max_length=200, verbose_name='导航链接', blank=False, null=False)
    img = models.CharField(max_length=200, verbose_name='导航图标', blank=True, null=True)

    def __str__(self):
        return self.name

    class Meta:
        db_table = 'navigation'


class Banner(models.Model):
    name = models.CharField(max_length=50, verbose_name='轮播图名称', blank=False, null=False)
    img = models.CharField(max_length=200, verbose_name='轮播图照片', blank=False, null=False)
    url = models.CharField(max_length=200, verbose_name='轮播图链接', blank=False, null=False)

    def __str__(self):
        return self.name

    class Meta:
        db_table = 'banner'
